﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" EnableEventValidation="false" EnableViewState="true" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="wfCompras.WebForm1" %>
<%@ Register src="ucControlFecha.ascx" tagname="ucControlFecha" tagprefix="uc1" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %> 

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    <style type="text/css">
        .style1
        {
            width: 62%;
        }
        .style2
        {
        }
        .style4
        {
            width: 73px;
            height: 21px;
        }
        .style12
        {
        }
        .style14
        {
            width: 14px;
            height: 21px;
        }
        .style18
        {
            width: 75px;
            height: 21px;
        }
        .style19
        {
        }
        .style32
        {
            height: 21px;
            width: 70px;
        }
        .style36
        {
            width: 75px;
        }
        .style41
        {
        }
        .style47
        {
        }
        .style48
        {
            height: 21px;
            width: 4px;
        }
        .style49
        {
        }
        .style50
        {
            height: 21px;
            width: 50px;
        }
        .style52
        {
            height: 21px;
            width: 629px;
        }
        .style64
        {
            width: 14px;
        }
        .style67
        {
            width: 70px;
        }
        .style69
        {
        }
        .style71
        {
            width: 629px;
        }
    </style>
     <style type="text/css">
        .modalBackground {
            background-color:#333333;
            filter:alpha(opacity=70);
            opacity:0.7;
        }
        .modalPopup {
            background-color:#FFFFFF;
            border-width:1px;
            border-style:solid;
            border-color:#CCCCCC;
            padding:1px;
            width:800px;
            Height:400px;
        }   
         .style72
         {
             width: 95%;
         }
    </style> 
    <script src="js/global.js" type="text/javascript"></script>
     <script type="text/javascript">
         function fDevolverSeleccion(codigo) {
             document.getElementById("<%= dpProv.ClientID %>").value = codigo
         }

         function fDevolverSeleccion2(codigo,Descrip) {
             document.getElementById("<%= txtCodPago.ClientID %>").value = codigo
             document.getElementById("<%= lblCodPago.ClientID %>").value = Descrip
         }

         function fDevolverSeleccion3(codigo, Descrip) {
             document.getElementById("<%= HiddPedidoPor.ClientID %>").value = codigo
             document.getElementById("<%= lblPedidoPor.ClientID %>").value = Descrip
         }

         function fDevolverSeleccion4(codigo, Descrip) {
             document.getElementById("<%= HiddImportacion.ClientID %>").value = codigo
             document.getElementById("<%= txtImportacion.ClientID %>").value = Descrip
         }


         function ResizeGrid() {
             internalGridResize("<%= GVDetalleProducto.ClientID %>");
         }


         function panelOnUpdating() {
             updatePanelAnimationUpdating();
         }


         function panelOnUpdated() {
             ResizeGrid();
             updatePanelAnimationUpdated();
         }

         function fDevolverSeleccion5(codigo, pres,producto,presenta,um,peso_bruto) {
             document.getElementById("<%= hddCodigo.ClientID %>").value = codigo
             document.getElementById("<%= hddPres.ClientID %>").value = pres
             document.getElementById("<%= hddProducto.ClientID %>").value = producto
             document.getElementById("<%= hddPresenta.ClientID %>").value = presenta
             document.getElementById("<%= hddUm.ClientID %>").value = um
             document.getElementById("<%= hddPesoBruto.ClientID %>").value = peso_bruto
         }


         function fLoadNumbers(combo1) {
             DoCallBack("RefreshLoadNumbers", combo1.value, End_fLoadNumbers)
         }
         //---------------------------------------------------------//
         function End_fLoadNumbers(arg) {
             var mData = arg.split(":::");
             document.getElementById("tdValorProv").innerHTML = mData[0];
             //si utilizas jQuery sería así
             //$("#tdValores").html(mData[0]);
         }

    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">


 <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>
      <div>
        <table class="style1">
        <tr>
            <td class="style2">
                <asp:Label ID="Label1" runat="server" Font-Size="Small" 
                    style="font-size: x-small" Text="Fecha O/C"></asp:Label>
            </td>
            <td class="style19" colspan="2">
                <uc1:ucControlFecha ID="ucControlFecha1" runat="server" Enabled="False" />
            </td>
            <td class="style47">
                &nbsp;</td>
            <td align="right" class="style67">
                <asp:Label ID="Label11" runat="server" style="font-size: x-small" 
                    Text="Cond. Pago"></asp:Label>
            </td>
            <td align="left" class="style69">
                <asp:TextBox ID="txtCodPago" CssClass="esdTextBox" runat="server" Width="50px" 
                    Enabled="False"></asp:TextBox>
            </td>
            <td class="style64">
                <asp:ImageButton ID="btnBuscarCondPago" runat="server" 
                    onclick="btnBuscarCondPago_Click" style="width: 14px" Enabled="False" />
            </td>
            <td class="style71">
                <asp:TextBox ID="lblCodPago"  CssClass="esdTextBox" runat="server" 
                    Enabled="False"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style2">
                <asp:Label ID="Label2" runat="server" style="font-size: x-small" 
                    Text="Proveedor"></asp:Label>
            </td>
            <td id="tdValorProv">
                <asp:DropDownList ID="dpProv" runat="server" Width="200px"  
                    CssClass="esdTextBox" Enabled="False">
                </asp:DropDownList>
            </td>
            <td class="style64">
                <asp:ImageButton ID="btnBuscarProv" runat="server" 
                    onclick="btnBuscarProv_Click" Enabled="False" />
            </td>
            <td class="style47">
                &nbsp;</td>
            <td align="right" class="style67">
                <asp:Label ID="Label13" runat="server" style="font-size: small" Text="Tipo"></asp:Label>
            </td>
            <td align="left" class="style69">
                <asp:DropDownList ID="dpTipo" CssClass="esdTextBox"  runat="server" 
                    Width="200px" Enabled="False">
                </asp:DropDownList>
            </td>
            <td class="style41" colspan="2">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style2">
                <asp:Label ID="Label3" runat="server" style="font-size: x-small" 
                    Text="Entrega en"></asp:Label>
            </td>
            <td class="style36">
                <asp:DropDownList ID="dpEntregaPor" runat="server" Width="200px"  
                    CssClass="esdTextBox" Enabled="False">
                </asp:DropDownList>
            </td>
            <td class="style64">
                &nbsp;</td>
            <td class="style47">
                &nbsp;</td>
            <td align="right" class="style67">
                <asp:Label ID="Label14" runat="server" style="font-size: x-small" 
                    Text="Modalidad"></asp:Label>
            </td>
            <td align="left" class="style69">
                <asp:DropDownList ID="dpModalidad" CssClass="esdTextBox" runat="server" 
                    Width="200px" Enabled="False">
                </asp:DropDownList>
            </td>
            <td class="style41" colspan="2">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style4">
                <asp:Label ID="Label4" runat="server" style="font-size: x-small" 
                    Text="Pedido por"></asp:Label>
            </td>
            <td class="style18">
             <input id="HiddPedidoPor" runat="server" name="HiddPedidoPor" size="4" style="width: 56px;
                    height: 0px" type="hidden" />
                <asp:TextBox ID="lblPedidoPor" runat="server" CssClass="esdTextBox" 
                    Enabled="False"></asp:TextBox>
            </td>
            <td class="style14">
                <asp:ImageButton ID="btnBuscarPedido" runat="server" Width="16px" 
                    onclick="btnBuscarPedido_Click" Enabled="False" />
            </td>
            <td class="style48">
                &nbsp;</td>
            <td align="right" class="style32">
                <asp:Label ID="Label15" runat="server" style="font-size: x-small" 
                    Text="Importacion"></asp:Label>
            </td>
            <td align="left" class="style50">
              <input id="HiddImportacion" runat="server" name="HiddImportacion" size="4" style="width: 56px;
                    height: 0px" type="hidden" />
                <asp:TextBox ID="txtImportacion" CssClass="esdTextBox" runat="server" 
                     Width="50px" Enabled="False"></asp:TextBox>
            </td>
            <td class="style14">
                <asp:ImageButton ID="btnBuscarImport" runat="server" 
                    onclick="btnBuscarImport_Click" Enabled="False" />
            </td>
            <td class="style52">
            </td>
        </tr>
        <tr>
            <td class="style2">
                <asp:Label ID="Label5" runat="server" style="font-size: x-small" 
                    Text="Usado en"></asp:Label>
            </td>
            <td class="style36">
                <asp:DropDownList ID="dpUsadoEn" runat="server" Width="200px"  
                    CssClass="esdTextBox" Enabled="False">
                </asp:DropDownList>
            </td>
            <td class="style64">
                &nbsp;</td>
            <td class="style47">
                &nbsp;</td>
            <td align="right" class="style67">
                <asp:Label ID="Label16" runat="server" style="font-size: x-small" Text="Moneda"></asp:Label>
            </td>
            <td align="left" class="style69">
                <asp:DropDownList ID="dpNoneda" CssClass="esdTextBox"  runat="server" 
                    Width="100px" Enabled="False">
                </asp:DropDownList>
            </td>
            <td class="style41" colspan="2">
                &nbsp;</td>
        </tr>
        <tr>
            <td class="style2">
                <asp:Label ID="Label6" runat="server" style="font-size: x-small" 
                    Text="Emitida por"></asp:Label>
            </td>
            <td class="style36">
                <asp:Label ID="lblEmitidoPor" CssClass="esdTextBox" runat="server"></asp:Label>
            </td>
            <td class="style64">
                &nbsp;</td>
            <td align="right" class="style47" colspan="2">
                <asp:Label ID="Label17" runat="server" style="font-size: x-small" 
                    Text="Tipo de cambio"></asp:Label>
            </td>
            <td align="left" class="style69" colspan="3">
                <asp:TextBox ID="txtTipCambio"  CssClass="esdTextBox" runat="server" 
                    Width="50px" Enabled="False"></asp:TextBox>
            </td>
        </tr>
        <tr>
            <td class="style2">
                <asp:Label ID="Label7" runat="server" style="font-size: x-small" 
                    Text="Prioridad"></asp:Label>
            </td>
            <td class="style36">
                <asp:DropDownList ID="dpPrioridad" runat="server" Width="200px"  
                    CssClass="esdTextBox" Enabled="False">
                </asp:DropDownList>
            </td>
            <td class="style64">
&nbsp;&nbsp;&nbsp;
            </td>
            <td align="right" class="style47" colspan="2">
                <asp:Label ID="Label18" runat="server" style="font-size: x-small" 
                    Text="Fecha de entrega"></asp:Label>
            </td>
            <td align="left" class="style49" colspan="3">
                <uc1:ucControlFecha ID="ucControlFecha2" runat="server" Enabled="False" />
            </td>
        </tr>
        <tr>
            <td class="style2">
                <asp:Label ID="Label8" runat="server" style="font-size: x-small" 
                    Text="Observacion"></asp:Label>
            </td>
            <td class="style12" colspan="7">
                <asp:TextBox ID="txtObseracion"  CssClass="esdTextBox" runat="server" 
                    Height="50px" Width="294px" Enabled="False"></asp:TextBox>
            </td>
        </tr>
            </table>

</div>
   
    <div>
    <asp:Button ID="btnNuevo" runat="server" onclick="btnNuevo_Click" 
        Text="Nuevo" />
       
  
    <br />
        <asp:LinkButton ID="ibtnAsignaH" runat="server" CssClass="btn btn-success">Nuevo</asp:LinkButton>
        &nbsp;<asp:LinkButton ID="ibtnEditarHorario" runat="server" CssClass="btn btn-success">Editar</asp:LinkButton>
                        
                    <div class="title">
                        <h4>
                            <span class="icon16 icomoon-icon-equalizer-2"></span>
                            <span>Detalle del producto  </span>                                                 
                        </h4>
                        <a href="#" class="minimize">Minimize</a>
                        <br />
                      <input id="hidId" runat="server" name="hidId" size="1" style="width: 32px; height: 22px" type="hidden" />
                      <input id="hdProducto" runat="server" name="hdColor" size="1" style="width: 32px; height: 22px"
                    type="hidden" />
                    </div>


                 <div style="overflow: auto; width: 1100px; height: 201px" >
                    <div class="DataDetail">
                       
              <asp:GridView ID="GVDetalleProducto" runat="server"  ScrollBars="Auto" 
                            ScrollWidth="100%" Width="100%" AutoGenerateColumns="False" 
                            ShowHeaderWhenEmpty="True" onrowcommand="GVDetalleProducto_RowCommand" 
                            onrowdatabound="GVDetalleProducto_RowDataBound">
                           
                         <AlternatingRowStyle CssClass="esdGridAlternativeRowStyle" />
            
                    <Columns>
                     <asp:TemplateField>
                            <ItemTemplate>
                                <asp:ImageButton ID="grdBttCmdEdit" CommandName="CmdEdit" CommandArgument="<%# Container.DataItemIndex %>"
                                    runat="server" ImageUrl="../Images/Icons/Enabled/Edit.png" 
                                    ToolTip="Filtrar Producto" />
                            </ItemTemplate>
                            <HeaderStyle Width="22px" />
                            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                        </asp:TemplateField>

                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:ImageButton ID="grdBttCmdMost" CommandName="CmdMst" CommandArgument="<%# Container.DataItemIndex %>"
                                    runat="server" ImageUrl="../Images/Icons/Enabled/HISTAPRO.png" 
                                    ToolTip="Mostrar el Registro" />
                            </ItemTemplate>
                            <HeaderStyle Width="22px" />
                            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                        </asp:TemplateField>

                       <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chkBxSelect" runat="server" />
                                    </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="idProducto">
                            <ItemTemplate>
                                <asp:TextBox ID="txtIdproducto" runat="server"  CssClass="esdTextBox"  
                                    Width="100px"  Text='<%# DataBinder.Eval(Container, "DataItem._Codigo") %>' 
                                    Enabled="False"></asp:TextBox>
                            </ItemTemplate>
                            <FooterStyle Font-Size="X-Small" />
                            <HeaderStyle Font-Size="X-Small" />
                            <ItemStyle Font-Size="X-Small" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Id pres" Visible="False">
                            <ItemTemplate>
                                <asp:TextBox ID="txtIdPres" runat="server" CssClass="esdTextBox"  Width="50px"  
                                    Text='<%# DataBinder.Eval(Container, "DataItem._Pres") %>' Enabled="False"></asp:TextBox>
                            </ItemTemplate>
                            <HeaderStyle Font-Size="X-Small" />
                            <FooterStyle Font-Size="X-Small" />
                           
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Producto">
                            <ItemTemplate>
                                <asp:TextBox ID="txtDsProducto" runat="server" CssClass="esdTextBox"  
                                    Width="200px"  Text='<%# DataBinder.Eval(Container, "DataItem._Producto") %>' 
                                    Enabled="False"></asp:TextBox>
                            </ItemTemplate>
                            <HeaderStyle Font-Size="X-Small" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Presentacion">
                            <ItemTemplate>
                                <asp:TextBox ID="txtPresentacion" runat="server" CssClass="esdTextBox"  
                                    Width="50px"  Text='<%# DataBinder.Eval(Container, "DataItem._Presenta") %>' 
                                    Enabled="False"></asp:TextBox>
                            </ItemTemplate>
                           <FooterStyle Font-Size="X-Small" />
                            <HeaderStyle Font-Size="X-Small" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="U.M">
                            <ItemTemplate>
                                <asp:TextBox ID="txtUM" runat="server" CssClass="esdTextBox"  Width="50px"  
                                    Text='<%# DataBinder.Eval(Container, "DataItem._UM") %>' Enabled="False"></asp:TextBox>
                            </ItemTemplate>
                            <FooterStyle Font-Size="X-Small" />
                            <HeaderStyle Font-Size="X-Small" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Peso Bruto">

                            <ItemTemplate>
                                <asp:TextBox ID="txtPesoBruto" runat="server" CssClass="esdTextBox"  
                                    Width="50px" Text='<%# DataBinder.Eval(Container, "DataItem._Peso_Bruto") %>' 
                                    Enabled="False"></asp:TextBox>
                            </ItemTemplate>
                            <FooterStyle Font-Size="X-Small" />
                            <HeaderStyle Font-Size="X-Small" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Lote">
                            <ItemTemplate>
                                <asp:TextBox ID="txtLote" runat="server" CssClass="esdTextBox" Width="50px" Text='<%# DataBinder.Eval(Container, "DataItem._Lote") %>'></asp:TextBox>
                            </ItemTemplate>
                            <HeaderStyle Font-Size="X-Small" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Fec. Vencimiento">
                            <ItemTemplate>
                                <asp:TextBox ID="txtFecVencimiento" runat="server" CssClass="esdTextBox" 
                                    Width="75px" Text='<%# DataBinder.Eval(Container, "DataItem._fe_venc") %>'></asp:TextBox>
                            </ItemTemplate>
                            <HeaderStyle Font-Size="X-Small" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Fec.Entrega">
                            <ItemTemplate>
                                <asp:TextBox ID="txtFecEngrega" runat="server" CssClass="esdTextBox" 
                                    Width="75px" Text='<%# DataBinder.Eval(Container, "DataItem._fe_Entrega") %>'></asp:TextBox>
                            </ItemTemplate>
                            <HeaderStyle Font-Size="X-Small" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="O.P">
                            <ItemTemplate>
                                <asp:DropDownList ID="dpdOP" runat="server" Width="100px">
                                    <asp:ListItem Value="P000002">Bocanegra</asp:ListItem>
                                    <asp:ListItem Value="P000003">Faucett</asp:ListItem>
                                </asp:DropDownList>
                            </ItemTemplate>
                            <HeaderStyle Font-Size="X-Small" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Cantidad">
                            <ItemTemplate>
                                <asp:TextBox ID="txtCantidad" runat="server" CssClass="esdTextBox" Width="50px" Text='<%# DataBinder.Eval(Container, "DataItem._Cant") %>'></asp:TextBox>
                            </ItemTemplate>
                            <HeaderStyle Font-Size="X-Small" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="p.Neto">
                            <ItemTemplate>
                                <asp:TextBox ID="txtPneto" runat="server" CssClass="esdTextBox" Width="50px" Text='<%# DataBinder.Eval(Container, "DataItem._PreNeto") %>'></asp:TextBox>
                            </ItemTemplate>
                            <FooterStyle Font-Size="X-Small" />
                            <HeaderStyle Font-Size="X-Small" />
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="P.U">
                            <ItemTemplate>
                                <asp:TextBox ID="txtPU" runat="server" CssClass="esdTextBox" Width="50px" Text='<%# DataBinder.Eval(Container, "DataItem._PreUnit") %>'></asp:TextBox>
                            </ItemTemplate>
                            <ControlStyle Font-Size="X-Small" />
                            <HeaderStyle Font-Size="X-Small" />
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Afect.IGV">
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chkBxIGV" runat="server"  />
                                    </ItemTemplate>
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="T.G">
                            <ItemTemplate>
                                <asp:DropDownList ID="dpTG" runat="server" Width="150px">
                                </asp:DropDownList>
                            </ItemTemplate>
                            <ControlStyle Font-Size="X-Small" />
                            <FooterStyle Font-Size="X-Small" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Und.Negocio">
                            <ItemTemplate>
                                <asp:DropDownList ID="dpdUN" runat="server" Width="150px" AutoPostBack="True" 
                                    onselectedindexchanged="dpdUN_SelectedIndexChanged">
                                </asp:DropDownList>
                            </ItemTemplate>
                            <HeaderStyle Font-Size="X-Small" />
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="C.C">
                            <ItemTemplate>
                                <asp:DropDownList ID="dpdCC" runat="server" Width="150px"  AutoPostBack="True" 
                                    onselectedindexchanged="dpdCC_SelectedIndexChanged"  >
                                </asp:DropDownList>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="idCosto" Visible="False">
                            <ItemTemplate>
                                <asp:TextBox ID="txtIdccostos" CssClass="esdTextBox"  runat="server" Width="50px" Text='<%# DataBinder.Eval(Container, "DataItem._idCosto") %>'></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="dsCosto">
                            <ItemTemplate>
                                <asp:TextBox ID="txtdsCosto" CssClass="esdTextBox"  runat="server" Width="150px" Text='<%# DataBinder.Eval(Container, "DataItem._C_Costos") %>'></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>

                          <asp:TemplateField>
                            <ItemTemplate>
                                <asp:ImageButton ID="grdBttCmdCalcular" CommandName="CmdCalc" CommandArgument="<%# Container.DataItemIndex %>"
                                    runat="server" ImageUrl="../Images/Icons/Enabled/Calculator.png" 
                                    ToolTip="Actualizar Totales"/>
                            </ItemTemplate>
                            <HeaderStyle Width="22px" />
                            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                        </asp:TemplateField>

                        <asp:TemplateField HeaderText="Dscto">
                            <ItemTemplate>
                                <asp:TextBox ID="txtDscto" runat="server" CssClass="esdTextBox" Width="50px" Text='<%# DataBinder.Eval(Container, "DataItem._Dscto") %>'></asp:TextBox>
                            </ItemTemplate>
                            <FooterStyle Font-Size="X-Small" />
                            <HeaderStyle Font-Size="X-Small" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="IGV">
                            <ItemTemplate>
                                <asp:TextBox ID="txtIGV" runat="server" CssClass="esdTextBox" Width="50px" Text='<%# DataBinder.Eval(Container, "DataItem._Igv") %>'></asp:TextBox>
                            </ItemTemplate>
                            <HeaderStyle Font-Size="X-Small" />
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="Sub. Total">
                            <ItemTemplate>
                                <asp:TextBox ID="txtSubTotal" runat="server" CssClass="esdTextBox" Width="50px" Text='<%# DataBinder.Eval(Container, "DataItem._subTotal") %>'></asp:TextBox>
                            </ItemTemplate>
                            <HeaderStyle Font-Size="X-Small" />
                        </asp:TemplateField>
                        <asp:TemplateField>
                            <ItemTemplate>
                                <asp:ImageButton ID="btnEliminar" runat="server" 
                                    CommandName="CmdDel"  ImageUrl="~/Images/Icons/Enabled/bt_borrar.gif"/>
                            </ItemTemplate>
                            <EditItemTemplate>
                                <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                            </EditItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                     <HeaderStyle CssClass="esdGridHeaderStyle" />
                        <PagerStyle CssClass="gridPagerStyle" />
                        <RowStyle CssClass="esdGridRowStyle" />
                        <SelectedRowStyle CssClass="esdGridSelectedRowStyle" />
                       <EmptyDataTemplate>
                        <div id="gridempty">
                            <asp:Image ID="imgEmpty" runat="server" ImageUrl="../Images/Controls/Attention.png" />
                            &nbsp;No existen registros para esta solicitud.
                        </div>
                    </EmptyDataTemplate>
                </asp:GridView>
                   </div>

               </div>
      </div>

        <table class="style72">
            <tr>
                <td align="right">
                    <asp:TextBox ID="txtTotal" runat="server"></asp:TextBox>
                </td>
            </tr>
        </table>
         <br />
        <br />
        <br />
        <input id="hddCodigo" type="hidden" runat ="server" />
        <input id="hddPres" type="hidden" runat ="server"/>
        <input id="hddProducto" type="hidden" runat ="server"/>
        <input id="hddPresenta" type="hidden" runat ="server"/>
        <input id="hddUm" type="hidden" runat ="server"/>
        <input id="hddPesoBruto" type="hidden" runat ="server"/>

         <br />

  
      <asp:HiddenField ID="hdnidCliProv" runat="server" />

<%--<div id="divControlContainer" runat="server"></div>

 <input id="dummy" type="button" style="display: none" runat="server" />

    <ajax:modalpopupextender runat="server"
                        ID="mpeThePopup"
                        TargetControlID="dummy"
                        PopupControlID="pnlModalPopUpPanel"
                        BackgroundCssClass="modalBackground"                       
                        DropShadow="true"/>  --%>
<asp:Panel runat="server" ID="PnlPopup" CssClass="modalPopup">
<%--<asp:Panel ID="pnlModalPopUpPanel" runat="server" CssClass="modalPopup">--%>

 <%--  <asp:UpdatePanel ID="udpInnerUpdatePanel" runat="Server" UpdateMode="Conditional">

      <ContentTemplate>--%>

</asp:Panel>
   
       <ajax:ModalPopupExtender runat="server" ID="mdlPopup" PopupControlID="PnlPopup" BackgroundCssClass="modalBackground" TargetControlID="hdnidCliProv">
       </ajax:ModalPopupExtender>

     </ContentTemplate>
    <%--  <Triggers>
         <asp:AsyncPostBackTrigger ControlID="bttOkPopup" />
     </Triggers>--%>

      </asp:UpdatePanel>
    <%--  <Triggers>
         <asp:AsyncPostBackTrigger ControlID="bttOkPopup" />
     </Triggers>--%>
</asp:Content>

   

        <%--<asp:HiddenField ID="hdnidCliProv" runat="server" />--%>
    <%--<ajax:modalpopupextender runat="server" ID="mdlPopup1" 
        PopupControlID="PnlPopup" BackgroundCssClass="modalBackground"
        TargetControlID="hdnidCliProv">
    </ajax:modalpopupextender>--%>

